package com.feidee.bigdata;

import com.feidee.bigdata.model.CommonResponse;
import com.feidee.bigdata.model.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:CHQ
 * @Date:2020/4/14 16:24
 * @Description
 */
@ComponentScan
@FeignClient(value = "PAYMENT-SERVICE") //指定微服务名称->对应Spring application name
public interface FeignService {

    @RequestMapping("/select/{id}") //对应上面服务名下的接口
    CommonResponse<Payment> select(@PathVariable("id") Long id);
}
